package com.ftg.learn.psi.controller;


import com.ftg.learn.psi.service.IEmpService;
import com.ftg.learn.psi.utils.ResEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 员工表 前端控制器
 * </p>
 *
 * @author guoBingTong
 * @since 2022-05-18
 */
@RestController
@RequestMapping("/psi/emp")
public class EmpController {

    @Autowired
    IEmpService iEmpService;

    /**
     * 查询所有员工的姓名及id
     * @return
     */
    @GetMapping("/findEmpIdAndName")
    public ResEntity findEmpIdAndName(){
        return new ResEntity(0,"success",iEmpService.findEmpIdAndName());
    }
}
